package android_design_mode.chapter23_facade;


/**
 * API常用模式
 * <p>
 * Glide
 * ImageLoader
 * OkHttp
 */
public class MobilePhone {
    private Phone phone = new PhoneImpl();
    private Camera camera = new SonyCamera();


    public void dail() {
        phone.dail();
    }

    public void videoChat() {
        System.out.println("-->Video chating......");
        camera.open();
        phone.dail();
    }

    public void hangup() {
        phone.hangup();
    }

    public void takePicture() {
        camera.takePicture();
    }

    public void closeCamera() {
        camera.close();
    }

}
